package com.ruoyi.xiche.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.xiche.domain.Store;
import com.ruoyi.xiche.domain.StoreWithRating;
import com.ruoyi.xiche.service.StoreService;
import com.ruoyi.xiche.mapper.StoreMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
* @author wangruoyang
* @description 针对表【store(门店表)】的数据库操作Service实现
* @createDate 2025-03-17 11:56:33
*/
@Service
public class StoreServiceImpl extends ServiceImpl<StoreMapper, Store>
    implements StoreService{


    private final StoreMapper storeMapper;

    public StoreServiceImpl(StoreMapper storeMapper) {
        this.storeMapper = storeMapper;
    }

    @Override
    public List<Map<String, Object>> getStoreRatings() {
        return storeMapper.getStoreRatings();
    }

    @Override
    public List<StoreWithRating> getStoreInfoByStoreId(Long storeId) {
        return storeMapper.getStoreInfoByStoreId(storeId);
    }
}




